CMAKE_MINIMUM_REQUIRED(VERSION 3.8)

list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
find_package(MySQL REQUIRED)
AUX_SOURCE_DIRECTORY(. CURRENT_DIR_SRCS)
ADD_LIBRARY(module_sqlconnection_pool ${CURRENT_DIR_SRCS})
if(MYSQL_FOUND)
    INCLUDE_DIRECTORIES(${MYSQL_INCLUDE_DIR})
    TARGET_LINK_LIBRARIES(module_sqlconnection_pool ${MYSQL_LIBRARIES})
else()
    MESSAGE(FATAL_ERROR "could not find SQL third library")
endif()
TARGET_LINK_LIBRARIES(module_sqlconnection_pool module_locker)